package com.smart.community.community.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.smart.community.commons.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * 社区实体类
 * 对应数据表: sc_community
 * 
 * @author Wu.Liang
 * @since 2024-12-19
 * @version 1.0.0
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("sc_community")
@Schema(description = "社区实体")
public class Community extends BaseEntity {
    
    @Schema(description = "社区名称")
    @TableField("community_name")
    private String communityName;
    
    @Schema(description = "社区编码")
    @TableField("community_code")
    private String communityCode;
    
    @Schema(description = "所属区域ID")
    @TableField("region_id")
    private Long regionId;
    
    @Schema(description = "管理员ID")
    @TableField("manager_id")
    private Long managerId;
    
    @Schema(description = "社区类型(1-住宅,2-商业,3-办公,4-混合)")
    @TableField("community_type")
    private Integer communityType;
    
    @Schema(description = "详细地址")
    @TableField("address")
    private String address;
    
    @Schema(description = "经度")
    @TableField("longitude")
    private BigDecimal longitude;
    
    @Schema(description = "纬度")
    @TableField("latitude")
    private BigDecimal latitude;
    
    @Schema(description = "占地面积(平方米)")
    @TableField("land_area")
    private BigDecimal landArea;
    
    @Schema(description = "建筑面积(平方米)")
    @TableField("building_area")
    private BigDecimal buildingArea;
    
    @Schema(description = "楼栋数量")
    @TableField("building_count")
    private Integer buildingCount;
    
    @Schema(description = "住户数量")
    @TableField("household_count")
    private Integer householdCount;
    
    @Schema(description = "停车位数量")
    @TableField("parking_count")
    private Integer parkingCount;
    
    @Schema(description = "状态(0-禁用,1-启用)")
    @TableField("status")
    private Integer status;
    
    @Schema(description = "社区描述")
    @TableField("description")
    private String description;
    
    @Schema(description = "开发商")
    @TableField("developer")
    private String developer;
    
    @Schema(description = "联系电话")
    @TableField("contact_phone")
    private String contactPhone;
    
    @Schema(description = "物业公司")
    @TableField("property_company")
    private String propertyCompany;
    
    @Schema(description = "社区图片")
    @TableField("images")
    private String images;
    
    @Schema(description = "扩展信息(JSON格式)")
    @TableField("extra_info")
    private String extraInfo;
    
    @Schema(description = "绿化率(%)")
    @TableField("green_rate")
    private BigDecimal greenRate;
    
    @Schema(description = "容积率")
    @TableField("plot_ratio")
    private BigDecimal plotRatio;
}
